//面试的请求封装
import request from "@/utils/http.ts"

//1.添加面试
export const addInterviewAPI = (data: any) => {
    return request({
        url: 'interview/addInterview',
        method: 'post',
        data: {
            interviewJobseekerId: data.interviewJobseekerId,//求职者id
            interviewEmployerId: data.interviewEmployerId,//招聘者id
            interviewJobId: data.interviewJobId,//岗位id
            interviewStatus: data.interviewStatus,//状态
            interviewType: data.interviewType,//面试类型
            interviewStartTime: data.interviewStartTime,//面试开始时间
            interviewEndTime: data.interviewEndTime,//面试结束时间
            interviewLink: data.interviewLink,//面试链接
            interviewRemarks:data.interviewRemarks,//备注，补充信息
        }
    })
}

//2.修改面试
export const updateInterviewAPI = (data: any) => {
    return request({
        url: 'interview/updateInterview',
        method: 'post',
        data: {
            interviewId: data.interviewId,//面试id
            interviewStatus: data.interviewStatus,//状态
            interviewType: data.interviewType,//面试类型
            interviewStartTime: data.interviewStartTime,//面试开始时间
            interviewEndTime: data.interviewEndTime,//面试结束时间
            interviewLink: data.interviewLink,//面试链接
            interviewRemarks:data.interviewRemarks,//备注，补充信息
        }
    })
}

//3.分页面试列表
export const pageInterviewAPI = (data: any) => {
    return request({
        url: 'interview/pageInterview',
        method: 'post',
        data: {
            pageCurrent: data.pageCurrent,//当前页码
            pageSize: data.pageSize,//每页显示条数
            interviewEmployerId: data.interviewEmployerId,//招聘者id
            interviewJobseekerId: data.interviewJobseekerId,//求职者id
            interviewStatus: data.interviewStatus,//面试状态
        }
    })
}

//4.查询面试详情根据面试id
export const getInterviewByIdAPI = (data: any) => {
    return request({
        url: 'interview/getInterviewById',
        method: 'post',
        params: {
            interviewId: data.interviewId,
            checkType: data.checkType,
        }
    })
}

//5.修改面试状态
export const updateInterviewStatusAPI = (data: any) => {
    return request({
        url: 'interview/updateInterviewStatus',
        method: 'post',
        params: {
            interviewId: data.interviewId,//面试id
            interviewStatus: data.interviewStatus,//状态
        }
    })
}
